Skip to content

feat: Add manifests for basic CDN for firmware images#1692

Merged
cardoe merged 9 commits into
mainfrom
cdn
Mar 7, 2026
Merged

feat: Add manifests for basic CDN for firmware images#1692
cardoe merged 9 commits into
mainfrom
cdn

Conversation

@stevekeay

@stevekeay stevekeay commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

This provides a HTTPS endpoint that will serve up files from our back-end object storage.

These manifests will create a global storage bucket to hold the content.

A site-local nginx proxy caches the files locally (should work for deployments in countries far away or on slow links).

The ingress was set up for cdn-edge cache on dev: https://github.com/RSS-Engineering/undercloud-deploy/pull/1332

@cardoe cardoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an entry into charts/argocd-understack/templates and it'll get deployed automatically put cdn in values.yaml under the site: block.

Comment thread components/cdn/nginx-config.yaml Outdated
Comment thread components/cdn/ingress.yaml Outdated
Comment thread components/cdn/httproute.yaml Outdated
Comment thread components/cdn/pvc.yaml Outdated
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-hostpath

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not where we'd want this since that would mean we have to ping the nginx to a specific node?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for the cache. The intention was to get fast, cheap, simple storage. If the pod moves to another node then it would re-populate the cache over there. If we run multiple pods, I don't know how that would interact with ceph-backed distributed storage.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storage on openebs-hostpath is quite limited - imho it normally should not be used for applications. The openebs-lvm would be better choice if you want to keep it local. If ceph, then ceph-block-ecoded if you want block or ceph-fs-ec if you want ReadWriteMany

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to openebs-lvm, multiple writers on ceph seems too advanced.

@stevekeay
stevekeay force-pushed the cdn branch 6 times, most recently from 641b729 to 66e204a Compare February 26, 2026 08:57

@skrobul skrobul left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider packaging those manifests into a helm chart so that the values can be adjusted on per-environment basis easily.
If you don't want to use the helm's default template, we have https://github.com/rxt-pvc/backbone-sno-helm-scaffold/ that is slightly smaller but will need adjustments for HTTPRoutes

Comment thread components/understack-cdn/README.md Outdated
Comment on lines +10 to +11
maxObjects: "1000"
maxSize: "5G"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems quite small, imho should be configurable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increased the size and made it configurable (via values.yaml)

@stevekeay stevekeay changed the title Add manifests for basic CDN for firmware images feat: Add manifests for basic CDN for firmware images Feb 26, 2026
@ctria

ctria commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Before merging, can we change the namespace to something like "understack-cdn" to avoid possible future overlaps?

@stevekeay

Copy link
Copy Markdown
Contributor Author

Before merging, can we change the namespace to something like "understack-cdn" to avoid possible future overlaps?

I changed the namespace name. I will remember this every time I have to type that name :)

@stevekeay
stevekeay force-pushed the cdn branch 2 times, most recently from f6dd6a4 to ec40cb2 Compare February 26, 2026 16:26
@stevekeay
stevekeay marked this pull request as ready for review February 26, 2026 16:29
@stevekeay
stevekeay force-pushed the cdn branch 2 times, most recently from e240966 to 068a2d9 Compare March 4, 2026 12:52
@stevekeay
stevekeay requested review from cardoe and skrobul March 4, 2026 12:56
@stevekeay
stevekeay force-pushed the cdn branch 4 times, most recently from e37fec6 to 922c9a6 Compare March 5, 2026 11:00
apiVersion: v1
kind: Namespace
metadata:
name: understack-cdn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this manifest. Helm can make its own and ArgoCD will track that for full clean up.

We can also eventually make the namespaces configurable to allow testing in parallel.

kind: ConfigMap
metadata:
name: nginx-config
namespace: understack-cdn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to set this as helm will when it's installing.

proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-id-2;

include /etc/nginx/conf.d/*.conf;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this mostly looks like the default file. Should we just mount the delta in a file here?

kind: ObjectBucketClaim
metadata:
name: {{ .Values.cdn.bucketName }}
namespace: understack-cdn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave this out.

namespace: understack-cdn
spec:
bucketName: {{ .Values.cdn.bucketName }}
storageClassName: ceph-bucket

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be configurable as well? Can it change?

kind: PersistentVolumeClaim
metadata:
name: nginx-cache
namespace: understack-cdn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this

spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-lvm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be configured?

storageClassName: openebs-lvm
resources:
requests:
storage: 5Gi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configured?

kind: Service
metadata:
name: cdn-edge
namespace: understack-cdn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this

@cardoe

cardoe commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

We can address the rest in a follow on.

@cardoe
cardoe enabled auto-merge March 7, 2026 16:35
@cardoe
cardoe added this pull request to the merge queue Mar 7, 2026
Merged via the queue into main with commit 944a7fd Mar 7, 2026
18 checks passed
@cardoe
cardoe deleted the cdn branch March 7, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants